//**********************************************************************
//	Programmer	-	Sujal Bista
//	File Name	-	utilityFunctions.h
//	Description	:	
//					basic utility functions
//
//**********************************************************************

#ifndef _UTILITY_FUNCTIONS_H_
#define _UTILITY_FUNCTIONS_H_

//compile only once
#pragma once

#include "global.h"
#include "bucketList.h"

//converts ansi to unicode
WCHAR *ansiToUnicode(char *ansiStr);

//converts unicode to ansi
char *unicodeToAnsi(WCHAR *unicodeStr);

//prints a string in debug window
void outputDebugString(const char *string, ...);

//trims c string from white space
void trim(char *str);

//reads setup file
bool readSetupFile(const char *fileName,bucketList<setupData> &setupContent);

//write setup file
bool writeSetupFile(const char *fileName,bucketList<setupData> &setupContent);

//reads entire file
bool readFile(const char *fileName, unsigned char *&data, unsigned int &dataLength);

//writes entire file
bool writeFile(const char *fileName, const unsigned char *data, const unsigned int &dataLength);

#endif
